package nil.ed.simulator.request.biz.qq.activity;

import nil.ed.simulator.request.client.activity.BuiltInAttrs;
import nil.ed.simulator.request.client.activity.IActivity;
import nil.ed.simulator.request.enums.ActivityGroup;
import org.apache.http.client.CookieStore;
import org.apache.http.impl.client.BasicCookieStore;
import org.apache.http.impl.client.HttpClientBuilder;

import java.util.Map;

public class Seq001EnvInitialActivity implements IActivity {
    @Override
    public boolean process(Map<String, Object> attrMap) {
        CookieStore cookieStore = new BasicCookieStore();
        attrMap.put(BuiltInAttrs.COOKIE_STORE_ATTR, cookieStore);
        attrMap.put(BuiltInAttrs.HTTP_CLIENT_ATTR, HttpClientBuilder.create().setDefaultCookieStore(cookieStore).build());
        return true;
    }

    @Override
    public int getSort() {
        return MIN_SORT;
    }

    @Override
    public ActivityGroup getGroup() {
        return ActivityGroup.QQ_LOGIN;
    }
}
